<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/* Override gmt_to_local() */
function gmt_to_local($time = '', $timezone = 'UTC', $dst = FALSE)
{
    $timezone = Settings::config('timezone') ? Settings::config('timezone') : $timezone;
    
    if ($time == '')
    {
        return now();
    }

    $time += timezones($timezone) * 3600;

    if ($dst == TRUE)
    {
        $time += 3600;
    }

    return $time;
}